﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using YFrameWork.RunTime;

public class LoadTestSpriteResources : MonoBehaviour
{
    ResourceComponent res;
    Sprite go;
    void Start()
    {
        res = GameEntry.Instance.GetComponent<ResourceComponent>();
        go= res.LoadResource<Sprite>("cat");
    }

    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.A))
        {
            res.ReleaseResource(go,true);
            go = null;
        }
        if (Input.GetKeyDown(KeyCode.S))
        {
            go = res.LoadResource<Sprite>("cat");
        }
    }

}
